<script src="/api/jquery/jquery.js"></script>
<link href="/com/SWFUpload/css/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/com/SWFUpload/api/swfupload.js"></script>
<script type="text/javascript" src="/com/SWFUpload/js/swfupload.queue.js"></script>
<script type="text/javascript" src="/com/SWFUpload/js/fileprogress.js"></script>
<script type="text/javascript" src="/com/SWFUpload/js/handlers.js"></script>
<script type="text/javascript">
        var swfu;

        window.onload = function() {
            var settings = {
                flash_url : "/com/SWFUpload/api/Flash/swfupload.swf",
                //upload_url: "/com/file_upload/saveFile.php?path=[php_property:path]",
                upload_url: "[php_script]",
                file_post_name : "file", 
                file_size_limit : "100 MB",
                file_types : "*.*",
                file_types_description : "All Files",
                file_upload_limit : 100,
                file_queue_limit : 0,
                custom_settings : {
                    progressTarget : "fsUploadProgress",
                    cancelButtonId : "btnCancel"
                },
                debug: false,
                
                // Button settings
                button_image_url: "/com/SWFUpload/images/TestImageNoText_65x29.png",
                button_width: "65",
                button_height: "29", 
                button_placeholder_id: "spanButtonPlaceHolder",  
                button_text: '<span class="snapol_button">Datei Upload</span>',
                button_text_style: ".theFont { font-size: 16; }",
                button_text_left_padding: 12,
                button_text_top_padding: 3, 
                
                // The event handler functions are defined in handlers.js
                file_queued_handler : fileQueued,
                file_queue_error_handler : fileQueueError,
                file_dialog_complete_handler : fileDialogComplete,
                upload_start_handler : uploadStart,
                upload_progress_handler : uploadProgress,
                upload_error_handler : uploadError,
                upload_success_handler : uploadSuccess,
                upload_complete_handler : uploadComplete,
                queue_complete_handler : queueComplete,     // Queue plugin event
               
                
                
                
            };

            swfu = new SWFUpload(settings);
         };
 
         
         
         
   /*      function fileDialogComplete(numFilesSelected, numFilesQueued) {
  
          //   alert("fertig");
             
             
  
  /*  try {
        if (numFilesQueued > 0) {
            this.startUpload();
        }
    } catch (ex) {
        this.debug(ex);
    }  */
//}



/*function fileDialogComplete(number, number2, number3) {
    this.startUpload();    
    //alert("fertig"); 
} */


function uploadComplete(file) {

    //alert(file);
    
    
    refreshId = "[html_property:refresh_id]";
    url = "/code/ajax/"+refreshId+".php";   //"?"+url_parameter;
    //alert("hier die url"+url);
    //prompt("", url);
    $('#[html_property:refresh_id]').load(url);
    
}
         
         
         
         
         
         
         
    </script>
